package pta;/**
 * @author： li
 * @date： 2022-03-31 19:46
 * @version 1.0
 */
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.*;
public class 输出GPLT {
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    public static void main(String[] args) throws IOException {
        Scanner sc =new Scanner(System.in);
        String a =sc.next();
        int count_g=0;
        int count_p=0;
        int count_l=0;
        int count_t=0;
        for(int i=0;i<a.length();i++){
            if(a.charAt(i)=='g'||a.charAt(i)=='G')
                count_g++;
            if(a.charAt(i)=='p'||a.charAt(i)=='P')
                count_p++;
            if(a.charAt(i)=='l'||a.charAt(i)=='L')
                count_l++;
            if(a.charAt(i)=='t'||a.charAt(i)=='T')
                count_t++;
        }
        int sum=(count_g+count_l+count_p+count_t);
        while(sum>0){
            if(count_g>0){
                out.write("G");
                count_g--;
            }
            if(count_p>0){
                out.write("P");
                count_p--;
            }
            if(count_l>0){
                out.write("L");
                count_l--;
            }
            if(count_t>0){
                out.write("T");
                count_t--;
            }
            sum--;
        }
        out.flush();
        out.close();

    }
}
